package com.qinhai.webcs.config;

import com.qinhai.webcs.interceptor.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName UserWebConfig
 * @Deacription
 * @Author qinhai
 * @Date 2021/4/14 20:47
 * @Version 1.0
 **/

@Configuration
public class UserWebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new UserInterceptor())
                .addPathPatterns("/cart/**");
    }

}
